GXCreateImageFile
QuickDraw GX sends theGXCreateImageFile
message before the imaging of a print job begins. You need to override theGXCreateImageFile
message if your device requires that an image file be created. Your override of theGXCreateImageFile
message must match the following formal declaration:
OSErr MyCreateImageFile (FSSpecPtr aFSSpecPtr, long imageFileOptions, long *fileReference);
aFSSpecPtr
- Where to create the image file.
imageFileOptions
- Options for creation of the image file, as shown in Table 4-7.
fileReference
- On return, this value specifies a reference to the created image file.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
You need to override theGXCreateImageFile
message if you are working with an output device that needs to be driven from a file. For example, a film recorder might need to process all of the data for a single image plane at once, due to hardware timing constraints. Or a facsimile machine might need to receive the data for a page without lengthy interruptions that indicate a disconnection. For devices with constraints like these, you need to send the printer data to a file that is subsequently streamed to the device.When you create an imaging file, QuickDraw GX stores the printing data and plays it back to the output device in a steady stream. The options that you specify in the
imageFileOptions
parameter define how the playback occurs, as shown in Table 4-7.The default implementation of this message creates the image file if the options specify that it should.
SPECIAL CONSIDERATIONS
You never send theGXCreateImageFile
message yourself.You must forward the
GXCreateImageFile
message to other message handlers. You can modify the options and then forward the message.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help